/**
 * ClueStatus枚举
 *
 * @author sxf
 * @email sxf02615@163.com
 * @date 2025/1/15
 */
package com.sxf.crm.enums;


import java.util.Arrays;

/**
 * 线索状态枚举
 */
public enum ClueStatus {
    NEW("新建"),
    ASSIGNED("已分配"),
    RECEIVED("已领取"),
    FOLLOW_UP("跟进中"),
    CONVERTED("已转化"),
    RECYCLED("已回收"),
    DELETED("已删除"), 
    AUTO_RECYCLED("自动回收"), 
    ACCEPTED("已接受");

    private final String label;

    ClueStatus(String label) {
        this.label = label;
    }

    public String getLabel() {
        return label;
    }

    public static ClueStatus fromValue(String value) {
        return Arrays.stream(ClueStatus.values())
            .filter(status -> status.name().equals(value))
            .findFirst()
            .orElse(null);
    }
}
